package routers

import (
	"2301a-user2/controllers"
	beego "github.com/beego/beego/v2/server/web"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	//用户登录
	beego.Router("/user2/login", &controllers.UserController{}, "post:Login")
	//用户注册
	beego.Router("/user2/register", &controllers.UserController{}, "post:Register")
	//文章注册
	beego.Router("/article/register", &controllers.UserController{}, "post:Register")
	//添加文章
	beego.Router("/article/add", &controllers.ArticleController{}, "post:Add")
	//文章展示
	beego.Router("article/list", &controllers.ArticleController{}, "get:List")
}
